package ups.Common;

import java.util.Hashtable;

public class ArgumentParser {
	private Hashtable<String,String> dict = new Hashtable<String,String>();
	public ArgumentParser( String[] args ) {
		if( args != null ) {
			//for( String a : args ) {
			//	System.out.println( a );
			//}
			int argIndex = 0;
			while( argIndex < args.length ) {
				String key = args[argIndex++];
				String value = args[argIndex++];
				this.setValueForKey( value, key );
			}
		}
	}
	
	public String valueForKey( String key) {
		return dict.get( key );
	}
	
	private void setValueForKey( String value, String key ) {
		dict.put( key, value );
	}
}